<template>
    <div>
<headers title="详情"></headers>
<van-tabs :active="active" animated>
  <van-tab title="商品">
<swiper :swiper="detail.pics" ></swiper>
<div>{{ detail.goods_name }}</div>
<div>${{ detail.goods_price }}</div>
  </van-tab>
  <van-tab title="详情">
    <div v-html="detail.goods_introduce"></div>
  </van-tab>
  <van-tab title="评价">内容 3</van-tab>
</van-tabs>
    </div>
</template>

<script setup>
import {ref} from "vue";
import swiper from '@/components/swiper.vue';
import headers from '@/components/header.vue';
import { useRoute, useRouter } from 'vue-router'
import { detailApi } from "@/api/api";
const router = useRouter()
const route = useRoute()
const goods_id=ref(route.query.goods_id);

const detail=ref({});

const detailFun=()=>{
    detailApi(goods_id.value).then((res)=>{
        detail.value=res.data.message;
    })
}
detailFun();

</script>

<style lang="scss" scoped>

</style>